/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.faith.mahounoshoujo.game.model.character.playable;

import com.faith.mahounoshoujo.game.model.character.AbstractGameCharacter;
import com.faith.mahounoshoujo.game.model.character.status.PlayableCharacterStatus;
import com.faith.mahounoshoujo.game.model.character.skill.Skill;
import com.faith.mahounoshoujo.game.model.character.skill.SuperSkill;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;

/**
 * This class represents a playable character
 * 
 * @author Faith
 */
public class PlayableCharacter extends AbstractGameCharacter{
    private PlayableCharacterStatus characterStatus;

    private SuperSkill superSkill;

    private HashMap<Integer, Skill> skills;

    private ArrayList<Skill> equipedSkills;

    public PlayableCharacterStatus getCharacterStatus() {
        return characterStatus;
    }

    public void setCharacterStatus(PlayableCharacterStatus characterStatus) {
        this.characterStatus = characterStatus;
    }

    public SuperSkill getSuperSkill() {
        return superSkill;
    }

    public void setSuperSkill(SuperSkill superSkill) {
        this.superSkill = superSkill;
    }

    public ArrayList<Skill> getEquipedSkills() {
        return equipedSkills;
    }

    public void setEquipedSkills(ArrayList<Skill> equipedSkills) {
        this.equipedSkills = equipedSkills;
    }

    public HashMap<Integer, Skill> getSkills() {
        return skills;
    }

    public void setSkills(HashMap<Integer, Skill> skills) {
        this.skills = skills;
    }

    public List<Skill> getAvailableSkills(int currentLevel){
        ArrayList<Skill> availableSkills = new ArrayList<Skill>();
        for(int i = 0 ; i <= currentLevel ; i++){
            Skill levelSkill = skills.get(i);
           if(levelSkill != null){
               availableSkills.add(levelSkill);
           }
        }
        return availableSkills;
    }

    public Collection<Skill> getAllSkills(){
        return skills.values();
    }
}
